﻿module lang.d.sts.statements.dlabeledstatement;

import lang.d.sts.statements.dstatement;
import lang.d.visitors.dvisitor;

class DLabeledStatement: DStatement {
    private DStatement myStatement;
    private string myIdentifier;

    public this(in string identifier, DStatement stat)
    in {
        assert(stat !is null);
    }
    body {
        myStatement = stat;
        myIdentifier = identifier;
        stat.setParent(this);
    }

    public DStatement getStatement() {
        return myStatement;
    }

    public string getIdentifier() const {
        return myIdentifier;
    }

    override public void accept(DVisitor visitor) {
        visitor.visitLabeledStatement(this);
    }
}